import request from './request'

export function getNewsData () {
  return request({
    url: '/message/friend.action',
    method: 'get'
  })
}

/**
 * 更新头像
 * @param {Object} params { userid, token, avatar }
 */
export function updateAvatar (params) {
  return request({
    url: '/users/updateAvatar',
    method: 'post',
    data: params
  })
}

/**
 * 收藏的产品
 * @param {Object} params { collectionData, token }
 */
export function getCollection (params) {
  return request({
    url: '/users/getCollection',
    method: 'get',
    params
  })
}
